package com.xbts.system.domain;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotEmpty;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import lombok.Data;
import com.xbts.common.annotation.Excel;
import com.xbts.common.utils.StringUtils;
import com.xbts.common.core.domain.BaseEntity;

/**
 * 标书类型对象 sei_task_type
 *
 * @author xbts
 * @date 2023-09-13
 */
@Data
@ApiModel("标书类型对象")
@TableName("sei_task_type")
public class SeiTaskType extends BaseEntity {

private static final long serialVersionUID=1L;

    /** id */
    @TableId
    private String id;

    /** 类型名称 */
    @Excel(name = "类型名称")
    @ApiModelProperty("类型名称")
    @NotEmpty(message = "类型名称不能为空")
    private String name;


    public<T> QueryWrapper<T> queryWrapper(){
        QueryWrapper<T> queryWrapper=new QueryWrapper<>();
        queryWrapper.like(StringUtils.isNotEmpty(name),"name",name);
        queryWrapper.eq(StringUtils.isNotEmpty(getCreateBy()),"create_by",getCreateBy());
        queryWrapper.orderByDesc("create_time");
        return queryWrapper;
    }
}